const routes = [
    {
      path: "/login",
      component: () => import(`@/views/login/Login.vue`),
    },
    {
      path: "/message",
      component: () => import(`@/views/user/Message.vue`)
    },
    {
      path: "/record",
      component: () => import(`@/views/user/Record.vue`)
    },
    {
      path: "/admin",
      name:'后台',
      component: () => import(`@/views/admin/Home/Home.vue`),
      meta: { breadcrumb: '后台' },
      redirect:"/adminLayout",
      children: [
        {
          path: "/adminLayout",
          name: '仪表盘',
          icon: 'DataLine',
          component: () => import(`@/views/admin/adminLayout/index.vue`),
          meta: { breadcrumb: '仪表盘' }
        },
        {
          path: "/userManage",
          name: '用户管理',
          icon: 'DataLine',
          component: () => import(`@/views/admin/userManage/index.vue`),
          meta: { breadcrumb: '用户管理' }

        },
        {
          path: "/tagsManage",
          name: '资讯分类',
          icon: 'DataLine',
          component: () => import(`@/views/admin/TagsManage.vue`),
          meta: { breadcrumb: '资讯分类' },
        },
        {
          path: "/newsManage",
          name: '资讯管理',
          icon: 'DataLine',
          component: () => import(`@/views/admin/NewsManage.vue`),
          meta: { breadcrumb: '资讯管理' },
        },
        {
          path: "/healthModelConfigManage",
          name: '模型管理',
          icon: 'DataLine',
          component: () => import(`@/views/admin/HealthModelConfigManage.vue`),
          meta: { breadcrumb: '模型管理' },
        },
        {
          path: "/userHealthManage",
          name: '健康记录',
          icon: 'DataLine',
          component: () => import(`@/views/admin/UserHealthManage.vue`),
          meta: { breadcrumb: '健康记录' },
        },
        {
          path: "/messageManage",
          name: '消息管理',
          icon: 'DataLine',
          component: () => import(`@/views/admin/MessageManage.vue`),
          meta: { breadcrumb: '消息管理' },
        },
        {
          path: "/evaluationsManage",
          name: '评论管理',
          icon: 'DataLine',
          component: () => import(`@/views/admin/EvaluationsManage.vue`),
          meta: { breadcrumb: '评论管理' },
        },
      ]
    },
    {
      path: "/user",
      component: () => import(`@/views/user/index.vue`),
      redirect:"/news-record",
      meta: {
        requireAuth: true,
      },
      children: [
        {
          name: '健康资讯',
          path: "/news-record",
          component: () => import(`@/views/user/recommend/index.vue`),
          meta: {
            requireAuth: true,
          },
        },
        {
          name: '我的收藏',
          path: "/my-save",
          component: () => import(`@/views/user/NewsSave.vue`),
          meta: {
            requireAuth: true,
          },
        },
        {
          name: '健康指标',
          path: "/user-health-model",
          component: () => import(`@/views/user/UserHealthModel.vue`),
          meta: {
            requireAuth: true,
          },
        },
        {
          name: '健康资讯详情',
          path: "/news-detail",
          component: () => import(`@/views/user/NewsDetail.vue`),
          meta: {
            requireAuth: true,
          },
          isHidden: true,
        },
        {
          name: '搜索页',
          path: "/search-detail",
          component: () => import(`@/views/user/Search.vue`),
          meta: {
            requireAuth: true,
          },
          isHidden: true,
        },
      ]
    }
  ];
  export default routes